package com.ww.springboot.boot.jvm;

/**
 *
 * -Xss128k   StackOverflowError
 * @author wanwei
 * @since 2021-03-09 10:53
 */
public class StackSof {

    private int length = 1;

    public void test() {
        length++;
        test();
    }


    public static void main(String[] args) {
        StackSof stackSof = new StackSof();
        try{
            stackSof.test();
        }catch (Throwable e){
            System.out.println(stackSof.length);
            throw e;
        }

    }
}
